package com.user.api;

import com.user.entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@FeignClient(name = "USER-CLIENT01",url = "http://localhost:10002")
public interface UserApi {

    /**
     * 列表
     * @param user
     * @param pageNum
     * @param pageSize
     * @return
     */
    @RequestMapping("list")
    public String getList( User user,@RequestParam(value = "pageNum",defaultValue = "1")Integer pageNum,@RequestParam(value = "pageSize",defaultValue = "3") Integer pageSize);

    /**
     * 登录
     * @param user
     * @return
     */
    @RequestMapping("login")
    public String login(@RequestBody User user);

    /**
     * 注册
     * @param user
     * @return
     */
    @RequestMapping("save")
    public String save(@RequestBody User user);




}
